#pragma once

#include <openssl/md5.h>
#include  "MDAlgorithm.h"

class MD5Algorithm final : public MDAlgorithm<MD5_CTX> {
public:

    MD5Algorithm() = default;
    MD5Algorithm(const MD5Algorithm&) = delete;
    MD5Algorithm& operator=(const MD5Algorithm&) = delete;
    virtual ~MD5Algorithm() = default;

private:

    virtual int MD_Init(MD5_CTX* ctx) const override;
    virtual int MD_Update(MD5_CTX* ctx, const char* data, size_t len) const override;
    virtual int MD_Final(unsigned char* md, MD5_CTX* ctx) const override;
};
